<?php
	/**
	* @package ParkFind
	* @desc This is the login receipt php script. This script is used displaying whether the user has successful logged in or not.
	*/
	/**
	* @desc This include file will load the directory settings for the Smarty Templates
	*/
	session_start();

	//Smarty
	require 'includes/smarty.inc';
	$smarty->assign('title', "Login");
	$smarty->assign('user_id', $_SESSION["user_id"]);	
	$smarty->assign('last', $_SESSION["lastviewed"]);
	$smarty->assign('firstname', $_SESSION["firstname"]);
	$smarty->assign('role', $_SESSION["role"]);
	$smarty->assign('top5', $_SESSION["top5"]);	
	$smarty->display('header.tpl');

	$result = $_GET["result"];

	if ($result == "success")		
	$smarty->assign('message', "Successfully logged in user");
		else
	$smarty->assign('message', "Failed to login");

	if (isset($_SESSION["referer"]))
		$smarty->assign('referer', $_SESSION["referer"]);
		
	$smarty->display('loginreceipt.tpl');

	unset($_SESSION["referer"]);

	$smarty->display('footer.tpl')

?>
